﻿using System;
using System.Net;
using System.Net.Sockets;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using SecretLabs.NETMF.Hardware;
using SecretLabs.NETMF.Hardware.Netduino;

namespace Test
{
    public class Program
    {
        public static void Main()
        {
            
            //this is the fail-safe feature, if something test code blocks the device communicating to PC, short you pin 3 and 4 to put to device to idle mode
            BypassSwitch bs = new BypassSwitch(Pins.GPIO_PIN_D3, Pins.GPIO_PIN_D4);
            if (bs.Test())
            {
                return; // exit the program if bypass switch is ON
            }

            SimpleTest t = new SimpleTest();
            t.Init();
            t.DumpRegisters();


            //t.SimpleReceiveTest();
            //t.SimpleSendTest();
            t.SimpleSendReceiveTest();

        }

    }
}
